package com.mod.enemies 
{
	import com.calefk.modules.math.Vector2D;
	import flash.display.MovieClip;
	import com.calefk.core.Project;
	import com.mod.Global;
	
	public class EnemyHunter extends Enemy 
	{
		public function EnemyHunter(canvas:MovieClip, nameClip:String=null, px:Number=0, py:Number=0, project:Project=null) 
		{
			super(canvas, nameClip, px, py, project);
			mObjectiveType = AT_VICTIM;
		}
		
		override public function update(dt:int):void {
			super.update(dt);
			switch(state) {
				case ST_STANDBY:
					beginMovement();
					break;
				case ST_MOVING:
					if (mVictim) {
						mObjectiveType = AT_VICTIM;
						goAfterVictim(dt);
					} else {
						mObjectiveType = AT_VICTIM;
						findVictim(dt);
						// no victim to find
						if (!mVictim) {
							mObjectiveType = AT_PLAYER;
							goAfterPlayer(dt);
						}
					}
					break;
				case ST_FIGHTING:
					updateFighting(dt);
					break;
			}
		}
		//
		override public function clean():void 
		{
			super.clean();
		}
		
	}

}